.sc-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: grid;
    place-items: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.sc-modal {
    width: 380px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    padding: 24px;
    border: 1px solid #f0f0f0;
}

.sc-title {
    font-weight: 600;
    font-size: 16px;
    color: #262626;
    margin-bottom: 16px;
    text-align: center;
}

.sc-canvas {
    position: relative;
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
    border: 2px solid #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fafafa;
}

.sc-hole,
.sc-piece {
    position: absolute;
    top: 50px;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    border: 2px solid #ffffff;
}

.sc-hole {
    background: rgba(0, 0, 0, 0.6);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.sc-piece {
    background-size: cover;
    background-position-y: -50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: grab;
    transition: transform 0.2s ease;
}

.sc-piece:hover {
    transform: scale(1.05);
}

.sc-piece:active {
    cursor: grabbing;
    transform: scale(0.95);
}

.sc-slider {
    position: relative;
    margin-top: 20px;
    height: 44px;
    background: #f5f5f5;
    border-radius: 22px;
    border: 1px solid #e8e8e8;
}

.sc-track {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 4px;
    transform: translateY(-50%);
    background: #e8e8e8;
    border-radius: 2px;
    margin: 0 22px;
}

.sc-thumb {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1890ff;
    color: #fff;
    display: grid;
    place-items: center;
    cursor: grab;
    user-select: none;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
    transition: all 0.3s ease;
    font-size: 16px;
}

.sc-thumb:hover {
    background: #40a9ff;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.sc-thumb:active {
    cursor: grabbing;
    transform: translateY(-50%) scale(0.95);
}

.sc-slider.ok .sc-thumb {
    background: #52c41a;
    box-shadow: 0 2px 8px rgba(82, 196, 26, 0.3);
}

.sc-slider.ok .sc-thumb:hover {
    background: #73d13d;
    box-shadow: 0 4px 12px rgba(82, 196, 26, 0.4);
}

.sc-slider.fail .sc-thumb {
    background: #ff4d4f;
    box-shadow: 0 2px 8px rgba(255, 77, 79, 0.3);
    animation: shake 0.5s ease-in-out;
}

.sc-slider.fail .sc-thumb:hover {
    background: #ff7875;
    box-shadow: 0 4px 12px rgba(255, 77, 79, 0.4);
}

@keyframes shake {

    0%,
    100% {
        transform: translateY(-50%) translateX(0);
    }

    25% {
        transform: translateY(-50%) translateX(-5px);
    }

    75% {
        transform: translateY(-50%) translateX(5px);
    }
}

.sc-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 16px;
}

.sc-btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #d9d9d9;
    background: #ffffff;
    cursor: pointer;
    font-size: 14px;
    color: #595959;
    transition: all 0.3s ease;
}

.sc-btn:hover {
    border-color: #40a9ff;
    color: #40a9ff;
    background: #f6ffed;
}

.sc-btn:active {
    transform: translateY(1px);
}

/* 加载状态 */
.sc-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 180px;
    color: #8c8c8c;
    font-size: 14px;
}

.sc-loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #f0f0f0;
    border-top: 2px solid #1890ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}